import { createRouter, createWebHistory, createWebHashHistory } from 'vue-router'
import { constantRoutes } from './routes'

export default createRouter({
  history: createWebHistory(),
  routes: [
    ...constantRoutes
  ],
  // 滚动行为，控制滚动条的位置
  scrollBehavior() {
    return {
      top: 0,
      left: 0
    }
  }
})